//
//  Rectangle.m
//  Demo0004
//
//  Created by zTercel on 12-12-28.
//  Copyright (c) 2012年 zTercel. All rights reserved.
//

#import "Rectangle.h"

@implementation Rectangle

@synthesize      left;
@synthesize      top;
@synthesize      right;
@synthesize      bottom;

-(void) print
{
    NSLog(@"rect(%i, %i, %i, %i)", left, top, right, bottom);
}

-(void) inflat:(int)x Y:(int)y
{
    left += x;
    right -= x;
    top += y;
    bottom -= y;
}

-(Rectangle*) copy
{
    Rectangle* rect = [Rectangle new];
    rect.left   = self.left;
    rect.top    = self.top;
    rect.right  = self.right;
    rect.bottom = self.bottom;
    
    return rect;
}


@end
